/*
 * @Description: 
 * @Author: HKH
 * @Date: 2024-09-10 08:53:41
 * @LastEditors: HKH
 * @LastEditTime: 2024-09-10 08:54:08
 */
public class TestAccount {
    // main方法
    public static void main(String[] args){
      // 创建一个 Account 的对象
      Account account1 = new Account();
      // 编译时错误 直接访问 private
      // account1.id = "001";
      // account1.balance = 9.00;
      // 正确的赋值方式
      account1.setId("001");
      account1.setBalance(0.0);
      // 取值
      // System.out.println("account1.id: " + account1.id);
      // System.out.println("account1.balance: " + account1.balance);
      // 正确的取值方式
      System.out.println("account1.getId(): " + account1.getId());
      System.out.println("account1.getBalance(): " + account1.getBalance());
  
      // 创建一个 Account 的对象
      Account account2 = new Account("002",0.0);
      System.out.println("account2.getId(): " + account2.getId());
      System.out.println("account2.getBalance(): " + account2.getBalance());
  
      // 创建一个 Account 的对象
      Account account3 = new Account("003","金卡",0.0);
      System.out.println("account3.getId(): " + account3.getId());
      System.out.println("account3.getBalance(): " + account3.getBalance());
    }
  }